package de.mhus.lib.cao;

import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;

import de.mhus.lib.core.lang.MObject;

public abstract class CaoConnection extends MObject {

	protected CaoDriver driver;
	
	public CaoConnection(CaoDriver driver) {
		this.driver = driver;
	}
	
	public CaoDriver getDriver() {
		return driver;
	}

	public InputStream getInputStream(URI uri) throws IOException {
		return getResource(uri).openStream();
	}

	public URL getResource(URI uri) {
		// TODO Auto-generated method stub
		return null;
	}
	
	public abstract CaoElement getNode(String name);
	
}
